import sys

def print_progress_callback(progress):
  progress_percent = '%.2f' % (progress * 100)
  sys.stdout.write('\rprogress: {}%'.format(progress_percent))
  sys.stdout.flush()
  if progress == 1: # if it finished
    sys.stdout.write('\nfinished downloading\n')

